package com.fresh.mapper;

import com.fresh.entity.Pay;
import com.fresh.entity.PayQO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface YingFuKuanMapper {

    List<Pay> findPageInfoByCondition(PayQO payQO);

    @Insert("insert into pay values(#{payId},#{cgNo},#{cgGname},#{cgNum},#{cgUname},#{riName},#{riNum},#{riPrice},#{riSname},#{payTotal},#{payIn},#{payEnd},1)")
    void insert(Pay pay);

    @Update("update pay set pay_status = 2,pay_end = #{payEnd} where pay_Id = #{payId}")
    void update(Pay pay);

}
